﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjetS5
{
    public class Equipment
    {
        public Equipment()
        {
            equippedItems = new List<KeyValuePair<DB_EquipmentSlot, Item>>();
        }

        public float GetSum(String statistic)
        {
            return (float)equippedItems.Sum(e => e.Value.item.Statistics.Single(e2 => e2.Key.Name == statistic).Value);
        }

        public List<KeyValuePair<DB_EquipmentSlot, Item>> equippedItems;
    }
}
